public class SwitchByEnum {
    public static void main(String[] args) {

        ColorEnum colorEnum = ColorEnum.RED;

        switch (colorEnum) {
            case RED:
                System.out.println("RED");
                break;
            case YELLOW:
                System.out.println("YELLOW");
                break;
            case WHITE:
                System.out.println("WHITE");
                break;
            default:
                break;
        }
    }
}
